package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class QualifyBulletin {
    private static String qualifyBulletin ="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<qualifyBulletin> \n" +
            "    <qualifyBulletinCode>{0}</qualifyBulletinCode>\n" +
            "    <unifiedDealCodes>{1}</unifiedDealCodes>\n" +
            "    <tenderProjectCode>{2}</tenderProjectCode>\n" +
            "    <bulletinNature>{3}</bulletinNature>\n" +
            "    <bulletinType>{4}</bulletinType>\n" +
            "    <qualificationsDocGetStartTime>{5}</qualificationsDocGetStartTime>\n" +
            "    <qualificationDocDeadLine>{6}</qualificationDocDeadLine>\n" +
            "    <qualificationsDocGetMethod>{7}</qualificationsDocGetMethod>\n" +
            "    <applicationDocReferEndTime>{8}</applicationDocReferEndTime>\n" +
            "    <applicationDocReferMethod>{9}</applicationDocReferMethod>\n" +
            "    <bidOpenTime>{10}</bidOpenTime>\n" +
            "    <docPrice>{11}</docPrice>\n" +
            "    <docPriceCurrency>{12}</docPriceCurrency>\n" +
            "    <docPriceUnit>{13}</docPriceUnit>\n" +
            "    <tenderMode>{14}</tenderMode>\n" +
            "    <syndicatedFlag>{15}</syndicatedFlag>\n" +
            "    <bulletinName>{16}</bulletinName>\n" +
            "    <bulletinContent>{17}</bulletinContent>\n" +
            "    <bulletInssueTime>{18}</bulletInssueTime>\n" +
            "    <bidSectionCodes>{19}</bidSectionCodes>\n" +
            "    <bulletinEndTime>{20}</bulletinEndTime>\n" +
            "    <bulletinDuty>{21}</bulletinDuty>\n" +
            "    <bulletinDutyCodeType>{22}</bulletinDutyCodeType>\n" +
            "    <bulletinDutyCode>{23}</bulletinDutyCode>\n" +
            "    <bulletinMedia>{24}</bulletinMedia>\n" +
            "    <URL>{25}</URL>\n" +
            "    <examinerName>{26}</examinerName>\n" +
            "    <examinerCodeType>{27}</examinerCodeType>\n" +
            "    <examinerCode>{28}</examinerCode>\n" +
            "    <attachmentCode>{29}</attachmentCode>\n" +
            "    <version>{30}</version>\n" +
            "    <isOpen>{31}</isOpen>\n" +
            "    <openType>{32}</openType>\n" +
            "    <platFormCode>{33}</platFormCode>\n" +
            "    <pubServicePlatCode>{34}</pubServicePlatCode>\n" +
            "    <verifyTime>{35}</verifyTime>\n" +
            "</qualifyBulletin>";

    public static void setQualifyBulletin(String qualifyBulletin,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10
            ,String s11,String s12,String s13,String s14,String s15,String s16,String s17,String s18,String s19,String s20
            ,String s21,String s22,String s23,String s24,String s25,String s26,String s27,String s28,String s29,String s30
            ,String s31,String s32,String s33,String s34,String s35) {
        QualifyBulletin.qualifyBulletin = MessageFormat.format(qualifyBulletin,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,
                s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,
                s31,s32,s33,s34,s35);
    }

    public static void setQualifyBulletin(){
        setQualifyBulletin(qualifyBulletin, ParameterUtils.get("qualifyBulletinCode"),
                                            ParameterUtils.get("unifiedDealCodes"),
                                            ParameterUtils.get("tenderProjectCode"),
                                            ParameterUtils.get("bulletinNature"),
                                            ParameterUtils.get("bulletinType"),
                                            ParameterUtils.get("qualificationsDocGetStartTime"),
                                            ParameterUtils.get("qualificationDocDeadLine"),
                                            ParameterUtils.get("qualificationsDocGetMethod"),
                                            ParameterUtils.get("applicationDocReferEndTime"),
                                            ParameterUtils.get("applicationDocReferMethod"),
                                            ParameterUtils.get("bidOpenTime"),
                                            ParameterUtils.get("docPrice"),
                                            ParameterUtils.get("docPriceCurrency"),
                                            ParameterUtils.get("docPriceUnit"),
                                            ParameterUtils.get("tenderMode"),
                                            ParameterUtils.get("syndicatedFlag"),
                                            ParameterUtils.get("bulletinName"),
                                            ParameterUtils.get("bulletinContent"),
                                            ParameterUtils.get("bulletInssueTime"),
                                            ParameterUtils.get("bidSectionCodes"),
                                            ParameterUtils.get("bulletinEndTime"),
                                            ParameterUtils.get("bulletinDuty"),
                                            ParameterUtils.get("bulletinDutyCodeType"),
                                            ParameterUtils.get("bulletinDutyCode"),
                                            ParameterUtils.get("bulletinMedia"),
                                            ParameterUtils.get("URL"),
                                            ParameterUtils.get("examinerName"),
                                            ParameterUtils.get("examinerCodeType"),
                                            ParameterUtils.get("examinerCode"),
                                            ParameterUtils.get("attachmentCode"),
                                            ParameterUtils.get("version"),
                                            ParameterUtils.get("isOpen"),
                                            ParameterUtils.get("openType"),
                                            ParameterUtils.get("platFormCode"),
                                            ParameterUtils.get("pubServicePlatCode"),
                                            ParameterUtils.get("verifyTime")

                );
    }
    public static void main(String[] args) {
        setQualifyBulletin();
        System.out.println(qualifyBulletin);
    }
}
